package org.zhigong.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zhigong.dao.ChuqinDao;
import org.zhigong.entity.Chuqin;
import org.zhigong.service.ChuqinService;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

/**
 * Created by Administrator on 2018/3/28 0028.
 */
@Service
public class ChuqinServiceImpl implements ChuqinService {

    @Autowired
    private ChuqinDao chuqinDao;

    public Chuqin getOndDay(Chuqin chuqin) {
        return chuqinDao.queryByYgbhRq(chuqin);
    }


    public List<Chuqin> getChuqinList(Chuqin chuqin) {
        return chuqinDao.selectByPage(chuqin);
    }

    public Boolean addChuqin(Chuqin chuqin) {
        return chuqinDao.insertChuqin(chuqin) == 1;
    }

    public Boolean deleteChuqin(Chuqin chuqin) {
        return chuqinDao.deleteChuqin(chuqin) == 1;
    }

    public Boolean updateChuqin(Chuqin chuqin) {
        return chuqinDao.updateChuqin(chuqin) == 1;
    }
}
